<template>
    <div class="demo-basic">
        <section>
            <p>
                <z-tag color="green">正常</z-tag>
                <z-tag color="yellow">到期</z-tag>
                <z-tag color="red">禁用</z-tag>
            </p>
        </section>
        <pre>
            <code>
            &lt;z-tag color="green"&gt;正常&lt;/z-tag&gt;
            &lt;z-tag color="yellow"&gt;到期&lt;/z-tag&gt;
            &lt;z-tag color="red"&gt;禁用&lt;/z-tag&gt;
            </code>
        </pre>
    </div>
</template>

<script>
    import hljs from 'highlight.js'

    export default {
        // 组件被挂载的时候执行的方法
        mounted: function () {
            window.setTimeout(function () {
                $('.demo-basic pre code').each(function(i, block) {
                    hljs.highlightBlock(block);
                });
            }, 0);
        }
    }
</script>
